const koa = require('koa');
const router = require('koa-router');

let server = new koa();
server.listen(8081);

server.use(async (ctx, next)=>{
  ctx.set('Access-Control-Allow-Origin', '*');
  await next();
});

let r1 = router();

r1.get('/a', ctx => {
  ctx.body = [12,4,5,6];
})

server.use(r1.routes());
